<template>
<div>
  <h1>新闻表</h1>
  <p>新闻：<input type="text" v-model="form.biaoti">
    <button @click="post_news">添加</button></p>
</div>
</template>

<script>
export default {
  name: "news",
  data(){
    return{
      form:{}
    }
  },
  methods:{
    post_news(){
      this.$axios.post('http://127.0.0.1:5000/',this.form)
      .then(res=>{
        if(res.data.code==200){
          alert('ok')
        }else {'no'}
      })
    }
  }
}
</script>

<style scoped>

</style>
